package klasy.powtorka;

import java.util.Date;

public final class Robotnik {

	private static int nextID;
	private String name;
	private Date hired;
	private int id;

	static {
		nextID = 1;
	}

	public Robotnik(String name, Date hired) {
		this.name = name;
		this.hired = new Date(hired.getTime());
		setID();
	}

	public static int getNextID() {
		return nextID;
	}

	public void setID(){
		this.id = nextID;
		nextID++;
	}
	
	public String getName() {
		return name;
	}

	public Date getHired() {
		return (Date) hired.clone();
	}

	public int getId() {
		return id;
	}

}
